# # 首先创建一个列表，其中包含一些要打印的设计
# unprinted_designs = ['phone case', 'robot pendant', 'dodecahedron']
# completed_models = []
#
# # 模拟打印每个设计，直到没有未打印的设计为止
# # 打印每个设计后，都将其移到列表 completed_models 中
# while unprinted_designs:
#     # 从该列表末尾删除一个设计，将其赋给变量current_design
#     current_design = unprinted_designs.pop()
#     # 显示一条消息，指出正在打印当前的设计
#     print(f"Printing model: {current_design}")
#     # 再将该设计加入列表completed_models
#     completed_models.append(current_design)
#
# # 显示打印好的所有模型
# print("\nThe following models have been printed:")
# for completed_model in completed_models:
#     print(completed_model)


# 首先，定义函数 print_models()，它包含两个形参：一个需要打印的设计列表和一个打印好的模型列表
def print_models(unprinted_designs, completed_models):
    """
    模拟打印每个设计，直到没有未打印的设计为止
    打印每个设计后，都将其移到列表 completed_models 中
    """
    while unprinted_designs:
        current_design = unprinted_designs.pop()
        print(f"Printing model: {current_design}")
        completed_models.append(current_design)

# 定义函数 show_completed_models()，它包含一个形参：打印好的模型列表
def show_completed_models(completed_models):
    """显示打印好的所有模型"""
    print("\nThe following models have been printed:")
    for completed_model in completed_models:
        print(completed_model)


unprinted_designs = ['phone case', 'robot pendant', 'dodecahedron']
completed_models = []

print_models(unprinted_designs, completed_models)
show_completed_models(completed_models)
